Skip to content

Lowercase GHCR image repository name in docker builds#159

Merged
jantman merged 1 commit into
mainfrom
fix-ghcr-lowercase-tag
Jun 13, 2026
Merged

Lowercase GHCR image repository name in docker builds#159
jantman merged 1 commit into
mainfrom
fix-ghcr-lowercase-tag

Conversation

@jantman

@jantman jantman commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Problem

The Docker test build is failing on main after the org transfer:

ERROR: failed to build: invalid tag
"ghcr.io/DecaturMakers/machine-access-control:1b48d748...":
repository name must be lowercase

The DecaturMakers org name has an uppercase letter, but Docker/GHCR repository names must be lowercase. The workflows built image tags directly from ${{ github.repository }}, which carries the uppercase org name.

Fix

Add a step that lowercases $GITHUB_REPOSITORY via bash parameter expansion (${GITHUB_REPOSITORY,,}) and reference its output in the ghcr.io/... tags, in both:

  • tests.yml — the docker job (SHA-tagged build)
  • release.yml — the publish job (:<tag> and :latest)

The OCI image labels (org.opencontainers.image.url/source) are left as-is since they're GitHub URLs and case-insensitive.

Notes

  • No documentation references the GHCR image path explicitly (no docker pull ghcr.io/... in docs/README/compose), so no docs change is needed. The published image will be ghcr.io/decaturmakers/machine-access-control (lowercase).
  • This needs to merge before the 0.14.0 tag is pushed, since the release build is triggered by the tag and reads release.yml from the tagged commit.

🤖 Generated with Claude Code

The DecaturMakers org name contains an uppercase letter, but Docker/GHCR
repository names must be lowercase. Building tags directly from
${{ github.repository }} produced an invalid tag
(ghcr.io/DecaturMakers/machine-access-control:...) and failed the build.

Add a step that lowercases $GITHUB_REPOSITORY via bash parameter
expansion and reference its output in the image tags, in both the
tests.yml docker job and the release.yml publish job. The OCI image
labels (URLs) are left as-is since GitHub URLs are case-insensitive.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissBranchBrPartCoverMissing
src/dm_mac
   __init__.py73060100% 
   cli_utils.py15000100% 
   neon_fob_adder.py2321560593%79, 116–117, 124, 270, 333–334, 341, 364–367, 454–456
   neongetter.py211154399%309
   slack_handler.py2200560100% 
   utils.py25040100% 
src/dm_mac/models
   __init__.py0000100% 
   api_schemas.py34000100% 
   machine.py592162001697%615, 695, 987–989, 1101–1110, 1168
   users.py1030320100% 
src/dm_mac/views
   __init__.py0000100% 
   api.py32000100% 
   machine.py1030120100% 
   prometheus.py1320121100% 
TOTAL1772324362598% 

Tests Skipped Failures Errors Time
312 0 💤 0 ❌ 0 🔥 24.451s ⏱️

@claude

claude Bot commented Jun 13, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@jantman jantman merged commit b15ac5e into main Jun 13, 2026
17 of 18 checks passed
@jantman jantman deleted the fix-ghcr-lowercase-tag branch June 13, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant